<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Class: Sass::Script::Parser</title>
<link rel="stylesheet" href="style.css" tppabs="http://sass-lang.com/docs/yardoc/css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="common.css" tppabs="http://sass-lang.com/docs/yardoc/css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="jquery.js" tppabs="http://sass-lang.com/docs/yardoc/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="app.js" tppabs="http://sass-lang.com/docs/yardoc/js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html" tppabs="http://sass-lang.com/docs/yardoc/_index.html">Index (P)</a> &raquo; 
    <span class='title'><a href="Sass-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass.html" title="Sass (module)">Sass</a></span> &raquo; <span class='title'><a href="Script.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script.html" title="Sass::Script (module)">Script</a></span>
     &raquo; 
    <span class="title">Parser</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="javascript:if(confirm(%27http://sass-lang.com/docs/yardoc/Sass/Script/.  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?%27))window.location=%27http://sass-lang.com/docs/yardoc/Sass/Script/.%27" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Sass::Script::Parser 
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Sass::Script::Parser</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">/var/www/sass-pages/.sass/lib/sass/script/parser.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>The parser for SassScript. It parses a string of code into a tree of <tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>s.</p>

  </div>
</div>
<div class="tags">
  
</div><div id="subclasses">
  <h2>Direct Known Subclasses</h2>
  <p class="children"><a href="CssParser.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/CssParser.html" title="Sass::Script::CssParser (class)">CssParser</a></p>
</div>

  <h2>Constant Summary</h2>
  



  <h2>Class Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse-class_method" title="parse (class method)">+ <strong>parse</strong>(str, line, offset, filename = nil) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses a SassScript expression.</span>
  
</li>

    
  </ul>

  <h2>Instance Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Parser) <strong>initialize</strong>(str, line, offset, options = {}) </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  

  
    <span class="summary_desc">A new instance of Parser.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#line-instance_method" title="#line (instance method)">- (Fixnum) <strong>line</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">The line number of the parser&#8217;s current position.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse-instance_method" title="#parse (instance method)">- (Script::Node) <strong>parse</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses a SassScript expression.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_function_definition_arglist-instance_method" title="#parse_function_definition_arglist (instance method)">- ((Array&lt;Script::Node&gt;, Script::Node)) <strong>parse_function_definition_arglist</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses the argument list for a function definition.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_interpolated-instance_method" title="#parse_interpolated (instance method)">- (Script::Node) <strong>parse_interpolated</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses a SassScript expression within an interpolated segment (<code>#{}</code>).</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_mixin_definition_arglist-instance_method" title="#parse_mixin_definition_arglist (instance method)">- ((Array&lt;Script::Node&gt;, Script::Node)) <strong>parse_mixin_definition_arglist</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses the argument list for a mixin definition.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_mixin_include_arglist-instance_method" title="#parse_mixin_include_arglist (instance method)">- ((Array&lt;Script::Node&gt;, {String =&gt; Script::Node}, Script::Node)) <strong>parse_mixin_include_arglist</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses the argument list for a mixin include.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_string-instance_method" title="#parse_string (instance method)">- (Script::Node) <strong>parse_string</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parse a single string value, possibly containing interpolation.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_until-instance_method" title="#parse_until (instance method)">- (Script::Node) <strong>parse_until</strong>(tokens) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Parses a SassScript expression, ending it when it encounters one of the given identifier tokens.</span>
  
</li>

    
  </ul>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><a href="" title="Sass::Script::Parser (class)">Parser</a></tt>) <strong>initialize</strong>(str, line, offset, options = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>A new instance of Parser</p>

  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt><a href="String.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/String.html" title="Sass::Script::String (class)">String</a></tt>, <tt>StringScanner</tt>)</span>
      
      
        <span class='name'>str</span>
      
      
      
        &mdash;
        The source text to parse
      
    </li>
  
    <li>
      
        <span class='type'>(<tt>Fixnum</tt>)</span>
      
      
        <span class='name'>line</span>
      
      
      
        &mdash;
        The line on which the SassScript appears. Used for error reporting
      
    </li>
  
    <li>
      
        <span class='type'>(<tt>Fixnum</tt>)</span>
      
      
        <span class='name'>offset</span>
      
      
      
        &mdash;
        The number of characters in on which the SassScript appears. Used for error reporting
      
    </li>
  
    <li>
      
        <span class='type'>(<tt>{Symbol =&gt; Object}</tt>)</span>
      
      
        <span class='name'>options</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        An options hash; see <a href="file.SASS_REFERENCE.html#sass_options" tppabs="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#sass_options" title="the Sass options documentation">the Sass options documentation</a>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


22
23
24
25</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 22</span>

def initialize(str, line, offset, options = {})
  @options = options
  @lexer = lexer_class.new(str, line, offset, options)
end</pre>
    </td>
  </tr>
</table>
</div>
  
</div>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="parse-class_method">
  
    + <strong>parse</strong>(str, line, offset, filename = nil) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses a SassScript expression.</p>

  </div>
</div>
<div class="tags">
  
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>)</span>
      
      
      
      
        &mdash;
        The root node of the parse tree
      
    </li>
  
</ul>

  <h3>See Also:</h3>
  <ul class="see">
    
      <li><a href="#initialize-instance_method" title="Sass::Script::Parser#initialize (method)">Parser#initialize</a></li>
    
      <li><a href="#parse-instance_method" title="Sass::Script::Parser#parse (method)">Parser#parse</a></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


165
166
167</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 165</span>

def self.parse(*args)
  new(*args).parse
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="line-instance_method">
  
    - (<tt>Fixnum</tt>) <strong>line</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>The line number of the parser&#8217;s current position.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>Fixnum</tt>)</span>
      
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


11
12
13</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 11</span>

def line
  @lexer.line
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse-instance_method">
  
    - (<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>) <strong>parse</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses a SassScript expression.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>)</span>
      
      
      
      
        &mdash;
        The root node of the parse tree
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the expression isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


48
49
50
51
52
53
54
55
56</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 48</span>

def parse
  expr = assert_expr :expr
  assert_done
  expr.options = @options
  expr
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_function_definition_arglist-instance_method">
  
    - (<tt>(Array&lt;<a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>&gt;, <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>)</tt>) <strong>parse_function_definition_arglist</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses the argument list for a function definition.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>(Array&lt;<a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>&gt;, <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>)</tt>)</span>
      
      
      
      
        &mdash;
        The root nodes of the arguments, and the splat argument.
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the argument list isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


123
124
125
126
127
128
129
130
131
132
133
134
135
136</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 123</span>

def parse_function_definition_arglist
  args, splat = defn_arglist!(true)
  assert_done

  args.each do |k, v|
    k.options = @options
    v.options = @options if v
  end
  splat.options = @options if splat
  return args, splat
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_interpolated-instance_method">
  
    - (<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>) <strong>parse_interpolated</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses a SassScript expression within an interpolated segment (<code>#{}</code>). This means that it stops when it comes across an unmatched <code>}</code>, which signals the end of an interpolated segment, it returns rather than throwing an error.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>)</span>
      
      
      
      
        &mdash;
        The root node of the parse tree
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the expression isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


34
35
36
37
38
39
40
41
42</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 34</span>

def parse_interpolated
  expr = assert_expr :expr
  assert_tok :end_interpolation
  expr.options = @options
  expr
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_mixin_definition_arglist-instance_method">
  
    - (<tt>(Array&lt;<a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>&gt;, <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>)</tt>) <strong>parse_mixin_definition_arglist</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses the argument list for a mixin definition.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>(Array&lt;<a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>&gt;, <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>)</tt>)</span>
      
      
      
      
        &mdash;
        The root nodes of the arguments, and the splat argument.
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the argument list isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


103
104
105
106
107
108
109
110
111
112
113
114
115
116</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 103</span>

def parse_mixin_definition_arglist
  args, splat = defn_arglist!(false)
  assert_done

  args.each do |k, v|
    k.options = @options
    v.options = @options if v
  end
  splat.options = @options if splat
  return args, splat
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_mixin_include_arglist-instance_method">
  
    - (<tt>(Array&lt;<a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>&gt;, {<a href="String.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/String.html" title="Sass::Script::String (class)">String</a> =&gt; <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>}, <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>)</tt>) <strong>parse_mixin_include_arglist</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses the argument list for a mixin include.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>(Array&lt;<a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>&gt;, {<a href="String.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/String.html" title="Sass::Script::String (class)">String</a> =&gt; <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>}, <a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a>)</tt>)</span>
      
      
      
      
        &mdash;
        The root nodes of the positional arguments, keyword arguments, and splat argument. Keyword arguments are in a hash from names to values.
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the argument list isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 81</span>

def parse_mixin_include_arglist
  args, keywords = [], {}
  if try_tok(:lparen)
    args, keywords, splat = mixin_arglist || [[], {}]
    assert_tok(:rparen)
  end
  assert_done

  args.each {|a| a.options = @options}
  keywords.each {|k, v| v.options = @options}
  splat.options = @options if splat
  return args, keywords, splat
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_string-instance_method">
  
    - (<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>) <strong>parse_string</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parse a single string value, possibly containing interpolation. Doesn&#8217;t assert that the scanner is finished after parsing.</p>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>)</span>
      
      
      
      
        &mdash;
        The root node of the parse tree.
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the string isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 143</span>

def parse_string
  unless (peek = @lexer.peek) &&
      (peek.type == :string ||
      (peek.type == :funcall && peek.value.downcase == 'url'))
    lexer.expected!("string")
  end

  expr = assert_expr :funcall
  expr.options = @options
  @lexer.unpeek!
  expr
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_until-instance_method">
  
    - (<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>) <strong>parse_until</strong>(tokens) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Parses a SassScript expression, ending it when it encounters one of the given identifier tokens.</p>

  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt>#include?(<a href="String.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/String.html" title="Sass::Script::String (class)">String</a>)</tt>)</span>
      
      
        <span class='name'>A</span>
      
      
      
        &mdash;
        set of strings that delimit the expression.
      
    </li>
  
</ul>
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt><a href="Node-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Script/Node.html" title="Sass::Script::Node (class)">Script::Node</a></tt>)</span>
      
      
      
      
        &mdash;
        The root node of the parse tree
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
        <span class='type'>(<tt><a href="SyntaxError.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></tt>)</span>
      
      
      
      
        &mdash;
        if the expression isn&#8217;t valid SassScript
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


64
65
66
67
68
69
70
71
72
73</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/script/parser.rb', line 64</span>

def parse_until(tokens)
  @stop_at = tokens
  expr = assert_expr :expr
  assert_done
  expr.options = @options
  expr
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Fri Mar  8 20:33:30 2013 by 
  <a href="javascript:if(confirm(%27http://yardoc.org/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://yardoc.org/%27" tppabs="http://yardoc.org/" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.7).
</div>


  <script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-535380-8");
  pageTracker._trackPageview();
  } catch(err) {}</script>


  </body>
</html>